package tedu.api.io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("foss.txt",true);

        /*String line = "生为同室亲，死为同穴尘。他人尚相勉，而况我与君。";
        byte[] data = line.getBytes(StandardCharsets.UTF_8);
        fos.write(data);*/

        fos.write("黔娄固穷士，妻贤忘其贫。冀缺一农夫，妻敬如宾。".getBytes(StandardCharsets.UTF_8));
        fos.close();


    }
}
